#include "StdAfx.h"
#include "ProgressStatusEventArgs.h"

using namespace Adaptive::Foundation;

/*--------------------------------------------------------------------------------
 * Constructor / Dispose / Destructor Methods
 *------------------------------------------------------------------------------*/
#pragma region Constructor / Dispose / Destructor Methods

ProgressStatusEventArgs::ProgressStatusEventArgs()
{
	_subStatus = nullptr;
	_subPercentDone = 0;
}
ProgressStatusEventArgs::ProgressStatusEventArgs(String^ status) : ProgressEventArgs(status)
{
	_subStatus = nullptr;
	_subPercentDone = 0;
}
ProgressStatusEventArgs::ProgressStatusEventArgs(int percentDone) : ProgressEventArgs(percentDone)
{
	_subStatus = nullptr;
	_subPercentDone = 0;
}
ProgressStatusEventArgs::ProgressStatusEventArgs(String^ status, int percentDone) : ProgressEventArgs(status, percentDone)
{
	_subStatus = nullptr;
	_subPercentDone = 0;
}
ProgressStatusEventArgs::ProgressStatusEventArgs(String^ status, int percentDone, String^ subStatus, int subPercentDone) : ProgressEventArgs(status, percentDone)
{
	_subStatus = subStatus;
	SubPercentComplete = subPercentDone;
}
ProgressStatusEventArgs::~ProgressStatusEventArgs()
{
	_subStatus = nullptr;
	_subPercentDone = 0;
}

#pragma endregion

/*--------------------------------------------------------------------------------
 * Public Properties
 *------------------------------------------------------------------------------*/
#pragma region Public Properties

String^ ProgressStatusEventArgs::SubStatus::get()
{
	return _subStatus;
}
void ProgressStatusEventArgs::SubStatus::set( String^ value)
{
	_subStatus = value;
}

int ProgressStatusEventArgs::SubPercentComplete::get()
{
	return _subPercentDone;
}
void ProgressStatusEventArgs::SubPercentComplete::set(int value)
{
	if (value < 0)
		_subPercentDone = 0;
	else if (value > 100)
		_subPercentDone = 100;
	else
		_subPercentDone = value;
}
#pragma endregion
